<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <#include "../common/header.ftl"/>

</head>
<body>
<script>
    $(function () {
        //图片展示
        var imgUrls=$(".imgUrls")
        console.log(imgUrls);
        //有多少个imgUrl,把他们遍历,然后再拆分
        for (i=0;i<imgUrls.length;i++){
            //遍历,把第i个取出,imgurl已经是选择了的,这样吧document对象转换成Jquery对象
            var temp=$(imgUrls[i])
            //拆分图片,变成一个数组
           var imgs =temp.html().split(";");
            //清空临时变量
            temp.empty();
            for (j=0;j<imgs.length;j++){
                temp.append("<img src='"+imgs[j]+"' width='50px' style='margin-right:5px'/>");
            };

        };
    })
</script>

<div class="container " style="margin-top: 20px">
    <#include "../common/top.ftl"/>
    <div class="row">
        <div class="col-sm-3">
        <#--设置当前要回显当前菜单,必须在载人菜单前完成设置-->
            <#assign menu="strategyComment"/>
            <#include "../common/menu.ftl"/>
        </div>
        <div class="col-sm-9">
            <div class="row">
                <div class="col-sm-12">
                    <h1 class="page-head-line">大家都在看</h1>
                </div>
            </div>
            <form method="post" action="" id="searchForm">
                <input type="hidden" id="currentPage" name="currentPage" value="1">
            </form>
            <table class="table table-striped table-hover">
                <thead>
                <tr>
                    <th>评论者</th>
                    <th>时间</th>
                    <th>图片</th>
                    <th>星星</th>
                    <th>攻略</th>
                    <th>状态</th>
                    <th width="30%">内容</th>
                </tr>
                </thead>
                <tbody>
                <#list pageInfo.list as entity>
                    <tr>
                        <td>${(entity.user.nickName)!}</td>
                        <td>${(entity.createTime?string("yyyy-MM-dd"))!}</td>
                        <td class="imgUrls">${(entity.imgUrls!)}</td>
                        <td>${(entity.starNum)!}</td>
                        <td>${(entity.strategy.title)!}</td>
                        <td>${(entity.state)!}</td>
                        <td>${(entity.content)!}</td>
                    </tr>
                </#list>

                </tbody>
            </table>
           <#include "../common/page.ftl"/>
        </div>
    </div>
</div>
</body>
</html>